package com.songcha.sakura.ui.decoration

import android.graphics.Rect
import android.view.View
import androidx.recyclerview.widget.RecyclerView
import com.songcha.library_common.util.dp2px

class ComicEpisodeItemDecoration : RecyclerView.ItemDecoration() {
    override fun getItemOffsets(
        outRect: Rect,
        view: View,
        parent: RecyclerView,
        state: RecyclerView.State
    ) {
        //super.getItemOffsets(outRect, view, parent, state)

        //val layoutParams: GridLayoutManager.LayoutParams =
        //    view.layoutParams as GridLayoutManager.LayoutParams

        //LogUtil.log(outRect)

        outRect.top=10f.dp2px().toInt()

        /*if(layoutParams.spanIndex%2==0){
            outRect.left=10f.dp2px().toInt()
            outRect.top=10f.dp2px().toInt()
            outRect.right=5f.dp2px().toInt()
            outRect.bottom==10f.dp2px().toInt()
        }else{
            outRect.left=5f.dp2px().toInt()
            outRect.top=10f.dp2px().toInt()
            outRect.right=10f.dp2px().toInt()
            outRect.bottom==10f.dp2px().toInt()
        }*/

    }
}